package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.CaseJudicial;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CaseCardDetailsMapper;
import com.ruoyi.system.domain.CaseCardDetails;
import com.ruoyi.system.service.ICaseCardDetailsService;

/**
 * 案件详情信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-25
 */
@Service
public class CaseCardDetailsServiceImpl implements ICaseCardDetailsService 
{
    @Autowired
    private CaseCardDetailsMapper caseCardDetailsMapper;

    /**
     * 查询案件详情信息
     * 
     * @param id 案件详情信息主键
     * @return 案件详情信息
     */
    @Override
    public CaseCardDetails selectCaseCardDetailsById(Long id)
    {
        return caseCardDetailsMapper.selectCaseCardDetailsById(id);
    }

    /**
     * 查询案件详情信息列表
     * 
     * @param caseCardDetails 案件详情信息
     * @return 案件详情信息
     */
    @Override
    public List<CaseCardDetails> selectCaseCardDetailsList(CaseCardDetails caseCardDetails,String dbDate)
    {
        return caseCardDetailsMapper.selectCaseCardDetailsList(caseCardDetails,dbDate);
    }

    @Override
    public List<CaseJudicial> selectCaseJudicialList(CaseJudicial caseJudicial, String dbDate)
    {
        return caseCardDetailsMapper.selectCaseJudicialList(caseJudicial,dbDate);
    }

    /**
     * 新增案件详情信息
     * 
     * @param caseCardDetails 案件详情信息
     * @return 结果
     */
    @Override
    public int insertCaseCardDetails(CaseCardDetails caseCardDetails)
    {
        caseCardDetails.setCreateTime(DateUtils.getNowDate());
        return caseCardDetailsMapper.insertCaseCardDetails(caseCardDetails);
    }

    /**
     * 修改案件详情信息
     * 
     * @param caseCardDetails 案件详情信息
     * @return 结果
     */
    @Override
    public int updateCaseCardDetails(CaseCardDetails caseCardDetails)
    {
        caseCardDetails.setUpdateTime(DateUtils.getNowDate());
        return caseCardDetailsMapper.updateCaseCardDetails(caseCardDetails);
    }

    /**
     * 批量删除案件详情信息
     * 
     * @param ids 需要删除的案件详情信息主键
     * @return 结果
     */
    @Override
    public int deleteCaseCardDetailsByIds(Long[] ids)
    {
        return caseCardDetailsMapper.deleteCaseCardDetailsByIds(ids);
    }

    /**
     * 删除案件详情信息信息
     * 
     * @param id 案件详情信息主键
     * @return 结果
     */
    @Override
    public int deleteCaseCardDetailsById(Long id)
    {
        return caseCardDetailsMapper.deleteCaseCardDetailsById(id);
    }
}
